Skip to content

docs: add JSDoc to all exported functions in src/ - #464

Draft
quantcode-agent[bot] wants to merge 1 commit into
mainfrom
quantcode/job-2b370988
Draft

quantcode-agent[bot] wants to merge 1 commit into
mainfrom
quantcode/job-2b370988

Conversation

@quantcode-agent

@quantcode-agent quantcode-agent Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Summary

Adds JSDoc comments (description, @param for every parameter, @returns, and @throws where the function actually throws) to every exported function under src/. Comment-only change — no behaviour, signature, or export changes. Nothing outside src/ touched.

Files changed

  • src/calculator.ts — add, subtract, multiply, divide (documents that divide returns Infinity/NaN on zero rather than throwing)
  • src/string-utils.ts — capitalize, reverse, truncate (@throws — currently a "not implemented" stub), slugify, wordCount
  • src/task-manager.ts — TaskManager class plus public methods add, get, list, complete, remove, update, sortBy (remove/update/sortBy get @throws — "not implemented" stubs)
  • src/date-utils.ts — formatRelative, isSameDay (existing one-line summary reworded to mention local time), addDays
  • src/validator.ts — isEmail, isUrl, isUsername, isAustralianPhone

Assumptions

  • Public methods of the exported TaskManager class were treated as exported functions and documented.
  • Exported types (Priority, Status, Task) are not functions and were left undocumented.
  • Docs describe current behaviour, including known bugs/stubs flagged by existing BUG/TODO comments (left untouched).

Verification

  • bun test: 44 pass / 16 fail — identical before and after this change (failures are pre-existing stubs/bugs).
  • git diff confirmed comment-only; reviewed (no critical/high issues; two minor wording inaccuracies fixed and re-reviewed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants